package com.soft.demo.action;

import java.util.List;

import javax.annotation.Resource;

import com.soft.demo.service.IDemoService;
import com.soft.mapping.Demo;
import com.soft.util.MyActionSupport;

public class DemoAction extends MyActionSupport {

	@Resource
	private IDemoService iDemoService;

	@Override
	public String execute() throws Exception {

		try {

			System.out.println(request.getParameter("id"));

			// iDemoService.test();
			this.maxcount = iDemoService.getCountDemo();
			this.page();
			List<Demo> demolist = iDemoService.getDemoList(pn, rn);

			request.setAttribute("demolist", demolist);

		} catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

}
